package com.itheima.service.impl;

import com.itheima.dao.BookMapper;
import com.itheima.domian.Book;
import com.itheima.service.BookService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class BookServiceImpl implements BookService {
    @Resource
    private BookMapper bookMapper;
    @Override
    public List<Book> FindAll() {
        return bookMapper.FindAll();
    }

    @Override
    public int UpdataBook(Book book) {
        return bookMapper.UpdateBook(book);
    }


    @Override
    public Book queryBookById(int id) {
        return bookMapper.queryBookById(id);
    }

    @Override
    public int addBook(Book book) {
        return bookMapper.addBook(book);
    }

    @Override
    public int deleteBook(int id) {
        return bookMapper.deleteBook(id);
    }


}
